@charset "UTF-8";

@import "../common";

@mixin dropdownItem($type) {
	> a {
		color: $type;
	}

	&:not(.disabled):hover > a {
		color: #FFF;
		background: $type;
	}

	> .bdp-dropdown {
		> button {
			color: $type;
		}
	}
}

.bdp-dropdown {
	display: inline-block;
	position: static;

	&.disabled {
		button {
			opacity: 0.5;
			cursor: not-allowed;
		}
	}

	> .dropdown-menu {
		> li {
			a {
				color: #333;
			}

			&.disabled {
				a {
					opacity: 0.5;
				}
			}

			&.primary {
				@include dropdownItem($primary);
			}
			&.info {
				@include dropdownItem($info);
			}
			&.danger {
				@include dropdownItem($danger);
			}
			&.warning {
				@include dropdownItem($warning);
			}
			&.success {
				@include dropdownItem($success);
			}

			> .bdp-dropdown {
				display: block;

				> button {
					border: 0;
					border-radius: 0;
					background: transparent;
					display: block;
					padding: 3px 20px;
					position: relative;
					width: 100%;
					text-align: left;
					outline: none;

					&:active {
						box-shadow: none;
					}

					> .fa {
						position: absolute;

						&.fa-caret-right {
							right: 8px;
							top: 6px;
						}
						&.fa-caret-left {
							left: 8px;
							top: 6px;
						}
					}
				}
			}
		}
	}
}
